class Solution(object):
    def longestCommonPrefix(self, strs):
        ans = ''
        aa= zip(*strs)
        print(aa)
        for i in zip(*strs):
            print(i)
            print(len(set(i)))
            if len(set(i)) == 1:
                ans += i[0]
            else:
                break
        return ans

if __name__ == '__main__':
    a = Solution()
    print(a.longestCommonPrefix(["dog","dogecar","dog"]))
